<template>
    <div class="my_div">
        <img :src="dogImgUrl" alt="">
        <p @click="btn">{{dogName}}</p>
    </div>
</template>

<script>
export default {
    props: ['dogName', 'dogImgUrl'],
    methods: {
        btn() {
            this.$emit('LoveDog', this.dogName)
        }
    }
}
</script>

<style>
.my_div {
    width: 200px;
    border: 1px solid black;
    text-align: center;
    float: left;
}

.my_div img {
    width: 100%;
    height: 200px;
}
</style>